package cn.itcast.service.provider;

import cn.itcast.domain.system.User;
import org.springframework.beans.factory.annotation.Autowired;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

public class BaseController {

    @Autowired
    protected HttpServletRequest request;
    @Autowired
    protected HttpServletResponse response;
    @Autowired
    protected HttpSession session;




    public String getLoginCompanyId(){
        return getloginUser().getCompanyId();
    }
    public String getLoginCompanyName(){
        return getloginUser().getCompanyName();
    }


    public User getloginUser(){
        return (User) session.getAttribute("loginUser");
    }
}
